{include file="../view/head" /}
<style>
    /*页面自定义样式*/
</style>
</head>
<!-- bootstrap样式表 -->
<!-- 时间选择器样式表 -->
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">
<body>
    {include file="../view/header" /}
    {include file="../view/sidebar" /}
    {include file="../view/right-sidebar" /}
    <!-- Start #content -->
    <div id="content">
        <!-- Start .content-wrapper -->
        <div class="content-wrapper">
            <div class="row">
                <!-- Start .row -->
                <!-- Start .page-header -->
                <div class="col-lg-12 heading hidden-xs hidden-sm">
                    <!-- Start .bredcrumb -->
                    <ul id="crumb" class="breadcrumb">
                        <li><i class="im-pencil"></i> 编辑矿机</li>
                    </ul>
                    <!-- End .breadcrumb -->
                </div>
                <!-- End .page-header -->
            </div>
            <!-- End .row -->
            <div class="outlet">
                <!-- Start .outlet -->
                <!-- Page start here ( usual with .row ) -->
                <div class="row">
                    <div class="col-lg-12">
                        <!-- Start col-lg-12 -->
                        <div class="panel panel-default toggle">
                            <!-- Start .panel -->
                            <div class="panel-heading">
                                <h3 class="panel-title">编辑矿机</h3>
                            </div>
                            <div class="panel-body">
                                <form class="form-horizontal group-border hover-stripped"
                                    action="{:url('project/updateProject',['id' => $arr.id])}" method="post" enctype="multipart/form-data">
                                    {:token()}
                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">名称 </span>

                                                <input name="name" type="text" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.name}" readonly /></td>
                                            </div>
                                        </div>
                                    </div>

                                    
                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">价格 </span>

                                                <input name="price" type="text" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.price}" /></td>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">库存 </span>

                                                <input name="stock" type="number" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.stock}" /></td>
                                            </div>
                                        </div>
                                    </div>
                                    
                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">运行周期 (天)</span>
                                                <input name="yxzq" type="text" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.yxzq}" /></td>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">限购数量</span>
                                                <input name="limit" type="number" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.limit}" /></td>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">产能币量 </span>
                                                <input name="capacity" type="number" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.capacity}" /></td>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">矿机算力 (G)</span>
                                                <input name="kjsl" type="text" id="IF_theme" class="form-control"
                                                    size="90" value="{$arr.kjsl}" /></td>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">开放时间</span>
                                                <input type="text" name="to_open_up_time" value='{$arr.to_open_up_time|date="Y-m-d H:i:s",###}' id="datetimepicker" class="form-control">
                                            </div>
                                        </div>
                                    </div>
                                    

                                    

                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">缩略图：</span>
                                                {if condition='$arr.imagepath'}
                                                <span class="input-group-addon" style="padding: 1px;">
                                                    <a href="{$arr.imagepath}" target="_black"><img src="{$arr.imagepath}" width='140' height='140' ></a>
                                                </span>
                                                {/if}
                                                <input type="file" name='file' id='face'  class="form-control"/>
                                                
                                            </div>
                                        </div>
                                    </div>


                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <div class="input-group">
                                                <span class="input-group-addon">简介：</span>
                                                <script id="editor" name="content" type="text/plain"
                                                    style="width:100%;height:200px;"></script>
                                            </div>
                                        </div>
                                    </div>
                                  
                                    <div class="form-group">
                                        <div class="col-lg-12 col-md-12">
                                            <input type="submit" class="btn btn-primary btn-block" value="处理">
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>

                    </div>
                </div>
                <!-- Page End here -->
            </div>
            <!-- End .outlet -->
        </div>
        <!-- End .content-wrapper -->
        <div class="clearfix"></div>
    </div>
    <!-- End #content -->
    {include file="../view/foot" /}
    <script src="/public/chajian/ueditor1_4_3_3-utf8-php/ueditor.config.js"></script>
    <script src="/public/chajian/ueditor1_4_3_3-utf8-php/ueditor.all.min.js"></script>
    <script src="/public/chajian/ueditor1_4_3_3-utf8-php/lang/zh-cn/zh-cn.js"></script>
    <!-- 时间选择器前置脚本 -->
    <script src="https://cdn.bootcss.com/moment.js/2.22.1/moment-with-locales.min.js"></script>
    <!-- 时间选择器核心脚本 -->
    <script src="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>

    <!-- 编辑器源码文件 -->
    
    <script type="text/javascript">
        //实例化编辑器
        //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
        var ue = UE.getEditor('editor', {
            autoHeight: false
        });

        //对编辑器的操作最好在编辑器ready之后再做
        ue.ready(function() {
            //设置编辑器的内容
            ue.setContent($('<div>').html('{$arr.content}').text());
            //获取html内容，返回: <p>hello</p>
            var html = ue.getContent();
            //获取纯文本内容，返回: hello
            var txt = ue.getContentTxt();
        });
    </script>
     <!-- 时间插件 -->
    <script>
        $("#datetimepicker").datetimepicker({

        format: 'YYYY-MM-DD HH:mm',
        locale: moment.locale('zh-CN')
    });
    </script> 


</body>

</html>